% This file creates Figure 5b and saves it as Figure_5b.eps in
% \Replication_files\Figures\

clear
cd ../mat_files
load('fig5b_data.mat');

[~,L]=size(correlations);
fig5b=figure;
hold on
box('on');

for i=1:L
     C=(L-i)*[1 1 1]./(L+8);
    plot(-8:1:8,correlations(:,i),'LineWidth',0.5,'Color',C)
end
plot(-8:1:8,zeros(1,17),'--k','LineWidth',0.5);
ylim([-0.65 0.4]);
xlim([-8 8]);
y1=get(gca,'ylim');
plot([0 0],y1,'--k','LineWidth',0.5);
xlabel('Lead/Lag of Markup','FontSize',11,'FontWeight','normal');
ylabel('Correlation with Output','FontSize',11,'FontWeight','normal');

fig5b.PaperUnits='inches';
fig5b.PaperPosition=[0 0 3.5 2.5];

cd ../Figures
print('Figure_5b','-depsc','-tiff')
cd ../m_files